<?php



namespace app\models;


class Upload extends \yii\base\Model{   //model 不进行连接数据表  用activeRecord 连接数据表
    //put your code here
    public $imgurl;
    
    public function rules() {
//        parent::rules();
        return [
            ['imgurl','required','message'=>'请选择文件'],
            ['imgurl','file','extensions'=>'png,jpg,jpeg,gif,doc','message'=>'格式不正确']  //extensions 文件后缀
        ];
        
    }
    
    
}
